package org.qs.webservice.dao.user;



import org.apache.ibatis.annotations.Param;
import org.qs.webservice.domain.UsBalance;
import org.springframework.stereotype.Component;

@Component
public interface UsBalanceMapper {
	/**
	 * 更新余额
	 * @Title: updateOrder 
	 * @param pay
	 * @return   
	 * @return int    
	 * @throws
	 */
	int updateBalance(UsBalance balance);
	/**
	 * 扣余额
	 * @param balance
	 * @return
	 */
	int updateBalanceByorder(UsBalance balance);
	/**
	 * 新建余额
	 * @Title: addBalance 
	 * @param pay
	 * @return   
	 * @return int    
	 * @throws
	 */
	int addBalance(UsBalance balance);
	
	/**
	 * 获取用户余额
	 * @Title: getBalance 
	 * @param balance
	 * @return   
	 * @return UsBalance    
	 * @throws
	 */
	UsBalance getBalance(@Param("user_id")Long user_id);
	
	
	/**
	 * 扣款
	 * @Title: updateBalanceByorder 
	 * @param balance
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int updateBalanceByorder(UsBalance balance);
	
	*/
	/**
	 * 获取用户余额
	 * @Title: getBalance 
	 * @param balance
	 * @return   
	 * @return UsBalance    
	 * @throws
	 *//*
	UsBalance getBalanceAndOrderno(@Param("user_id")Long user_id,@Param("orderno")Long orderno);
*/}